package mypazar.cartago;

import mypazar.jenamodel.PazarVocabulary;
import cartago.ArtifactId;
import cartago.CartagoException;
import cartago.Op;
import cartago.util.agent.CartagoBasicContext;

public class DenemeStall1WFPercept extends Thread {

	private static final String AGENT_NAME_STALL1 = "stall1";
	String productName;
	ArtifactId artIdStall1;

	public DenemeStall1WFPercept(String productName, ArtifactId artIdStall1) {
		this.productName = productName;
		this.artIdStall1 = artIdStall1;
	}

	public void run() {

		CartagoBasicContext ctX = new CartagoBasicContext(AGENT_NAME_STALL1,
				PazarVocabulary.PAZAR_CARTAGO_ENV_NAME);
		try {
			ctX.doAction(artIdStall1, new Op("checkProduct", productName));
		} catch (CartagoException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
